#include <stdio.h>

//typedef 类型声明
//别名 Stu


typedef struct Stu
{
    char name[20];//名字
    int age;//年龄
    char sex[5];//性别
    char id[20];//学号
} Stu;

struct Point
{
    int x;
    int y;
    char c[100];
} Point;
struct Node {
    int data;
    struct Point p;
    struct Node* next;
}n1 = {10, {4,5}, NULL};



void print(struct Stu* ps)
{
    printf("name = %s age = %d\n", (*ps).name, (*ps).age);
    printf("name = %s age = %d\n", ps->name, ps->age);
}

int test_struct_exam1()
{

    struct Node n2 = {20, {5, 6}, NULL};
    printf("size:%d \n", sizeof(n2));

    struct Stu s = {"zhangsan", 20};
    print(&s);
    return 0;
}
